home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameWare Collection
/
GameWare Collection (CMS Software) (1993).iso
/
games
/
g_games
/
gobble.asc
< prev
next >
Wrap
Text File
|
1983-08-20
|
6KB
|
171 lines
5 'Gobble --- Version 4/24/82 --- With Auto-Scoring
10 CLS:KEY OFF:DEF SEG:POKE 106,0
12 ON ERROR GOTO 18
14 PLAY ""
16 ON ERROR GOTO 0:GOTO 20
18 PRINT "SORRY, YOU MUST LOAD 'BASICA' TO RUN THIS PROGRAM.":PRINT:RESUME 19
19 ON ERROR GOTO 0:END
20 DEFINT A-Z:DIM X(4),Y(4),VX(4),VY(4),U$(4)
30 I=0:A$="":N=0:L=1:C1=22:C2=59:DULL=7:BRIGHT=15
35 GOSUB 1000
40 GOSUB 2000
60 S=0:YES=1:NO=0
80 C=0:A$=INKEY$:STRIG ON:IF STRIG(1)=-1 THEN STICKS=YES:GOTO 100
81 IF A$=CHR$(27) THEN CHAIN "menu",0
90 Z=RND*30000:RANDOMIZE Z:IF A$="" THEN 80 ELSE IF ASC(A$)<>71 AND ASC(A$)<>103 THEN GOTO 80
100 PLAY "MBMST250L4O3G4P16O4G8.P16E8C8G4E4P4O3G+4O4G+8.P16F8C+8G+4F4P4T130O3G8 F+8F+16G16G+16A16A+16B16O4C8"
102 COLOR 15,0:CLS :STRIG OFF
105 PRINT TAB(18) CHR$(201);STRING$(20,205);CHR$(32);STRING$(20,205);CHR$(187)
110 FOR N=0 TO 9
120 PRINT TAB(18) CHR$(186);STRING$(41,249);CHR$(186)
130 NEXT
131 PRINT TAB(18) CHR$(32);STRING$(41,249);CHR$(32)
132 FOR N=0 TO 9
133 PRINT TAB(18) CHR$(186);STRING$(41,249);CHR$(186)
134 NEXT
135 PRINT TAB(18) CHR$(200);STRING$(20,205);CHR$(32);STRING$(20,205);CHR$(188)
140 RESTORE
150 FOR I=0 TO 4
160 READ X(I),Y(I),VX(I),VY(I)
170 NEXT
180 U$(0)=CHR$(249)
190 FOR I=1 TO 3
200 U$(I)=U$(0)
210 NEXT
220 U$(4)=" "
230 FOR I=0 TO 3
240 LOCATE Y(I),X(I),0
250 PRINT CHR$(2)
260 NEXT
270 C=0:H=0
280 LOCATE Y(4),X(4),0
290 PRINT CHR$(1)
300 LOCATE 24,35,0:PRINT "Score = ";S;
310 A$=INKEY$
320 A$=INKEY$:IF A$="" GOTO 361
330 IF ASC(A$)=97 OR ASC(A$)=65 THEN VY(4)=1:VX(4)=0:GOTO 370
340 IF ASC(A$)=93 THEN VY(4)=0:VX(4)=1:GOTO 370
350 IF ASC(A$)=91 THEN VY(4)=0:VX(4)=-1:GOTO 370
359 IF ASC(A$)=113 OR ASC(A$)=81 THEN VY(4)=-1:VX(4)=0:GOTO 370
360 IF ASC(A$)=32 THEN VY(4)=0:VX(4)=0:GOTO 370
361 IF STICKS=NO GOTO 370
362 X=STICK(0)
363 Y=STICK(1)
364 IF Y<14 THEN VY(4)=1:VX(4)=0:GOTO 370
365 IF X<13 THEN VY(4)=0:VX(4)=1:GOTO 370
366 IF X>91 THEN VY(4)=0:VX(4)=-1:GOTO 370
367 IF Y>75 THEN VY(4)=-1:VX(4)=0:GOTO 370
369 VX(4)=0:VY(4)=0
370 FOR I=0 TO 3
380 LOCATE Y(I),X(I),0
390 PRINT U$(I)
400 Y(I)=Y(I)+VY(I)
410 IF Y(I)<2 OR Y(I)>C1 THEN VY(I)=-VY(I):GOTO 400
420 X(I)=X(I)+VX(I)
430 IF X(I)<19 OR X(I)>C2 THEN VX(I)=-VX(I):GOTO 420
440 LOCATE Y(I),X(I),0
450 U$(I)=CHR$(SCREEN(Y(I),X(I)))
460 PRINT CHR$(2)
470 IF U$(I)=CHR$(1) THEN H=1
480 IF U$(I)<>CHR$(2) GOTO 550
490 FOR N=0 TO 3
500 IF N=I GOTO 540
510 IF X(I)<>X(N) GOTO 540
520 IF Y(I)<>Y(N) THEN 540
530 U$(I)=U$(N):N=3
540 NEXT N
550 NEXT
560 IF H=1 THEN 900
570 LOCATE Y(4),X(4),0
580 PRINT " "
590 Y(4)=Y(4)+VY(4):X(4)=X(4)+VX(4)
591 IF Y(4)=12 AND X(4)=18 AND VX(4)=-1 THEN X(4)=59:GOTO 640
592 IF Y(4)=12 AND X(4)=60 AND VX(4)=1 THEN X(4)=19:GOTO 640
593 IF Y(4)=1 AND X(4)=39 AND VY(4)=-1 THEN Y(4)=22:GOTO 640
594 IF Y(4)=23 AND X(4)=39 AND VY(4)=1 THEN Y(4)=2:GOTO 640
600 IF Y(4)<2 THEN Y(4)=2:GOTO 620
610 IF Y(4)>C1 THEN Y(4)=C1
620 IF X(4)<19 THEN X(4)=19:GOTO 640
630 IF X(4)>C2 THEN X(4)=C2
640 LOCATE Y(4),X(4),0
650 U$(4)=CHR$(SCREEN(Y(4),X(4)))
660 PRINT CHR$(1)
670 IF U$(4)=CHR$(2) THEN 900
680 IF U$(4)=CHR$(249) THEN C=C+1:S=S+L:LOCATE 24,43,0: PRINT S;:GOSUB 4000:IF C=860 GOTO 820
700 U$(4)=" "
720 FOR I=0 TO 3
730 IF RND*10>L GOTO 800
735 IF RND*4>I+L GOTO 745
740 IF Y(4)>Y(I) THEN VY(I)=VY(I)+1 ELSE VY(I)=VY(I)-1
745 IF RND*4>I+L GOTO 770
750 IF X(4)>X(I) THEN VX(I)=VX(I)+1 ELSE VX(I)=VX(I)-1
760 IF VX(I)<-1 THEN VX(I)=-1:GOTO 770
765 IF VX(I)>1 THEN VX(I)=1
770 IF VY(I)<-1 THEN VY(I)=-1:GOTO 800
780 IF VY(I)>1 THEN VY(I)=1
800 NEXT
810 GOTO 320
820 CLS
830 PRINT TAB(27) "Next time won't be so easy!":PRINT
840 PRINT TAB(27) "TRY AGAIN !!! Level = ";L+1
845 LOCATE 11,25,0:PRINT "PUSH 'G' OR TRIGGER TO CONTINUE"
850 L=L+1
860 GOTO 80
870 DATA 19,2,1,1,59,2,-1,1,59,22,-1,-1,19,22,1,-1,39,12,0,0
900 PLAY "MBMLL4T130O0B4B-64A64A-64G64G-64F2"
910 FOR X=1 TO 6000:NEXT
920 IF S<SCORE(10) THEN 40
930 CLS:PRINT"CONGRATULATIONS! YOUR SCORE IS IN THE TOP 10!":PRINT:PRINT:PRINT
935 A$=INKEY$:IF A$<>"" THEN 935
940 PRINT"Please enter your name for the permanent record. ---- ";
950 LINE INPUT NAME.$(10):NAME.$(10)=LEFT$(NAME.$(10),14):SCORE(10)=S
960 FOR X=9 TO 1 STEP -1
970 IF SCORE(X) >= SCORE(X+1) THEN 995
980 SWAP SCORE(X),SCORE(X+1):SWAP NAME.$(X),NAME.$(X+1)
990 NEXT
995 GOSUB 1600:GOTO 40
1000 ON ERROR GOTO 1500
1020 OPEN "GOBBLE.SCO" FOR INPUT AS #1
1040 ON ERROR GOTO 0
1060 FOR X=1 TO 10
1080 LINE INPUT #1,NAME.$(X) : INPUT #1,SCORE(X)
1100 NEXT:CLOSE
1120 RETURN
1500 CLOSE:RESTORE 2300
1540 FOR X=1 TO 10
1560 READ NAME.$(X),SCORE(X)
1580 NEXT:RESUME 1600
1600 OPEN "GOBBLE.SCO" FOR OUTPUT AS #1
1620 FOR X=1 TO 10
1640 PRINT #1,NAME.$(X):PRINT #1,SCORE(X)
1660 NEXT:CLOSE
1680 ON ERROR GOTO 0:RETURN
2000 CLS:COLOR BRIGHT
2020 LOCATE 4,24:PRINT "THE TEN TOP SCORES ARE:"
2040 FOR X=1 TO 5
2060 LOCATE 6+2*X,1
2080 IF RIGHT$(NAME.$(X),1)="|" THEN COLOR DULL ELSE COLOR BRIGHT
2100 PRINT TAB(7) X; NAME.$(X);TAB(25) SCORE(X);
2120 IF RIGHT$(NAME.$(X+5),1)="|" THEN COLOR DULL ELSE COLOR BRIGHT
2140 PRINT TAB(38) X+5; NAME.$(X+5);TAB(56) SCORE(X+5)
2160 NEXT
2179 COLOR DULL:LOCATE 22,16,0:PRINT "MOVES ARE: Q=UP, A=DOWN, [=LEFT, and ]=RIGHT ";
2180 COLOR DULL:LOCATE 23,16,0:PRINT "Push 'G' to Gobble ..... 'Esc' to return to Menu";
2190 LOCATE 24,22,0:PRINT "(Push trigger for joysticks)";
2200 RETURN
2300 DATA Superman |,1000
2310 DATA Outstanding |,800
2320 DATA WOW |,600
2330 DATA Great |,400
2340 DATA Good |,300
2350 DATA Acceptable |,250
2360 DATA Not Bad |,200
2370 DATA Fair |,150
2380 DATA Beginner |,100
2390 DATA Dummy |,50
4000 PLAY "mbl64t255o2;cc#dd#gg#"
4010 RETURN
Fair |,150
2380 DATA Beginner |,100
2390 DATA Dummy |,50
4000 PLAY "mbl64t255o2;cc#dd#gg